package random.fox.p2p.model;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import random.fox.p2p.AppModule;
import random.fox.p2p.interactors.MessageInteractor;
import random.fox.p2p.presenter.LikePresenter;
import random.fox.p2p.presenter.LikePresenterImpl;
import random.fox.p2p.ui.LikeView;
import random.fox.p2p.view.ILikeView;

/**
 * Created by delong on 2015/4/1.
 */
@Module(
        injects = {
                LikeView.class,
        },
        addsTo = AppModule.class
)
public class LikeModule {
    ILikeView iLikeView;

    public LikeModule(ILikeView iLikeView){
        this.iLikeView = iLikeView;
    }

    @Provides
    @Singleton
    public ILikeView provideILikeView() {
        return iLikeView;
    }

    @Provides
    @Singleton
    public LikePresenter providerLikePresenter(ILikeView iLikeView , MessageInteractor interactor){
        return new LikePresenterImpl(iLikeView , interactor);
    }
}
